import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

Vue.config.productionTip = false;

Vue.filter("filtime", function(val) {
  console.log(val);
  var time = new Date(val);
  //把这个时间字符串转化为时间对象
  var year = time.getFullYear();
  var month = time.getMonth() + 1;
  var day = time.getDate();
  var hours = time.getHours();
  var minus = time.getMinutes();
  var seconds = time.getSeconds();
  return `${year}-${month}-${day} ${hours}:${minus}:${seconds}`;
});
//全局过滤器
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
